using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using PlugNT.App.Payment.Model;

namespace PlugNT.App.Payment.Web
{
    public partial class ReturnPage_ChinaBank : System.Web.UI.Page
    {
        protected string v_oid; 
        protected string v_pstatus; 



        protected string v_pstring; 
        protected string v_pmode; 
        protected string v_md5str; 
        protected string v_amount; 
        protected string v_moneytype; 
        protected string remark1;
        protected string remark2;
        protected string status_msg;

        protected void Page_Load(object sender, EventArgs e)
        {

            try
            {

                BLL.Payonline bllPayonline = new BLL.Payonline();
                PayonlineInfo payInfo = bllPayonline.GetPayonlineInfo(int.Parse(Request.Form["payment_id"]));
                string[] arr = payInfo.arr_str.Split(',');







                string key = payInfo.account;

                v_oid = Request["v_oid"];
                v_pstatus = Request["v_pstatus"];
                v_pstring = Request["v_pstring"];
                v_pmode = Request["v_pmode"];
                v_md5str = Request["v_md5str"];
                v_amount = Request["v_amount"];
                v_moneytype = Request["v_moneytype"];
                remark1 = Request["remark1"];
                remark2 = Request["remark2"];

                string str = v_oid + v_pstatus + v_amount + v_moneytype + key;
                str = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "md5").ToUpper();

                if (str == v_md5str)
                {
                    status_msg = "ok";

                    if (v_pstatus.Equals("20"))
                    {


                    }
                }
                else
                {
                    status_msg = "error";
                }
            }
            catch
            {
                status_msg = "error";
            }
        }
    }
}

